<?php
/**
 * Created by 胡祥能 on 2018/4/19.
 *  email：huxiangneng@jiuletech.com
 */

namespace App\Helpers;

use Log;

class MyLog
{
    public static function log($content, $prefix='error', $path='logs/')
    {
        $monolog = Log::getMonolog();
        $monolog->popHandler();
        $log_path = "{$path}/{$prefix}.log";

        Log::useDailyFiles(storage_path($log_path));
        Log::info($content);
    }
}